@class-prefix-floating-panel: ~'uabm-floating-panel';

.@{class-prefix-floating-panel} {
  --border-radius: 8px;
  --header-height: 28px;
  --z-index: var(--uabm-floating-panel-z-index, 900);

  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  display: flex;
  flex-direction: column;
  touch-action: none;
  z-index: var(--z-index);

  // 拖拽至顶时底部暴露，需要底部垫底颜色
  &::after {
    content: '';
    display: block;
    position: absolute;
    bottom: -100vh;
    height: 100vh;
    width: 100vw;
    background: var(--uabm-color-background);
  }

  &-mask {
    display: block;
    position: absolute;
    top: -100vh;
    left: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
  }

  &-header {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    cursor: grab;
    user-select: none;
    background-color: var(--uabm-color-background);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
  }
  &-bar {
    width: 20px;
    height: 3px;
    border-radius: 10px;
    background: var(--uabm-color-light);
  }

  &-content {
    flex: 1;
    overflow-y: scroll;
    background: var(--uabm-color-background);
  }
}
